Optimal. Leaf size=63 \[ -\frac {4 x}{a^4}-\frac {4 i \log (\cos (c+d x))}{a^4 d}+\frac {\tan (c+d x)}{a^4 d}+\frac {4 i}{d \left (a^4+i a^4 \tan (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3568, 45}
\begin {gather*} \frac {\tan (c+d x)}{a^4 d}+\frac {4 i}{d \left (a^4+i a^4 \tan (c+d x)\right )}-\frac {4 i \log (\cos (c+d x))}{a^4 d}-\frac {4 x}{a^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 3568
Rubi steps
\begin {align*} \int \frac {\sec ^6(c+d x)}{(a+i a \tan (c+d x))^4} \, dx &=-\frac {i \text {Subst}\left (\int \frac {(a-x)^2}{(a+x)^2} \, dx,x,i a \tan (c+d x)\right )}{a^5 d}\\ &=-\frac {i \text {Subst}\left (\int \left (1+\frac {4 a^2}{(a+x)^2}-\frac {4 a}{a+x}\right ) \, dx,x,i a \tan (c+d x)\right )}{a^5 d}\\ &=-\frac {4 x}{a^4}-\frac {4 i \log (\cos (c+d x))}{a^4 d}+\frac {\tan (c+d x)}{a^4 d}+\frac {4 i}{d \left (a^4+i a^4 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(214\) vs. \(2(63)=126\).
time = 0.79, size = 214, normalized size = 3.40 \begin {gather*} \frac {\sec (c) \sec (c+d x) (-\cos (c+d x)+i \sin (c+d x)) (-i \cos (3 c+2 d x)+2 d x \cos (3 c+2 d x)+2 \cos (c+2 d x) (d x+i \log (\cos (c+d x)))+\cos (c) (-3 i+4 d x+4 i \log (\cos (c+d x)))+2 i \cos (3 c+2 d x) \log (\cos (c+d x))+\sin (c)-2 \sin (c+2 d x)+2 i d x \sin (c+2 d x)-2 \log (\cos (c+d x)) \sin (c+2 d x)-\sin (3 c+2 d x)+2 i d x \sin (3 c+2 d x)-2 \log (\cos (c+d x)) \sin (3 c+2 d x))}{2 a^4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.29, size = 41, normalized size = 0.65
method | result | size |
derivativedivides | \(\frac {\tan \left (d x +c \right )+4 i \ln \left (\tan \left (d x +c \right )-i\right )+\frac {4}{\tan \left (d x +c \right )-i}}{d \,a^{4}}\) | \(41\) |
default | \(\frac {\tan \left (d x +c \right )+4 i \ln \left (\tan \left (d x +c \right )-i\right )+\frac {4}{\tan \left (d x +c \right )-i}}{d \,a^{4}}\) | \(41\) |
risch | \(\frac {2 i {\mathrm e}^{-2 i \left (d x +c \right )}}{a^{4} d}-\frac {8 x}{a^{4}}-\frac {8 c}{a^{4} d}+\frac {2 i}{d \,a^{4} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {4 i \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{a^{4} d}\) | \(78\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 95, normalized size = 1.51 \begin {gather*} \frac {\frac {4 \, {\left (\tan \left (d x + c\right )^{2} - 2 i \, \tan \left (d x + c\right ) - 1\right )}}{a^{4} \tan \left (d x + c\right )^{3} - 3 i \, a^{4} \tan \left (d x + c\right )^{2} - 3 \, a^{4} \tan \left (d x + c\right ) + i \, a^{4}} + \frac {4 i \, \log \left (i \, \tan \left (d x + c\right ) + 1\right )}{a^{4}} + \frac {\tan \left (d x + c\right )}{a^{4}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 102, normalized size = 1.62 \begin {gather*} -\frac {2 \, {\left (4 \, d x e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, {\left (2 \, d x - i\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + 2 \, {\left (i \, e^{\left (4 i \, d x + 4 i \, c\right )} + i \, e^{\left (2 i \, d x + 2 i \, c\right )}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - i\right )}}{a^{4} d e^{\left (4 i \, d x + 4 i \, c\right )} + a^{4} d e^{\left (2 i \, d x + 2 i \, c\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sec ^{6}{\left (c + d x \right )}}{\tan ^{4}{\left (c + d x \right )} - 4 i \tan ^{3}{\left (c + d x \right )} - 6 \tan ^{2}{\left (c + d x \right )} + 4 i \tan {\left (c + d x \right )} + 1}\, dx}{a^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 146 vs. \(2 (57) = 114\).
time = 0.77, size = 146, normalized size = 2.32 \begin {gather*} \frac {2 \, {\left (-\frac {2 i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{4}} + \frac {4 i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}{a^{4}} - \frac {2 i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a^{4}} + \frac {2 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 i}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} a^{4}} - \frac {2 \, {\left (3 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 8 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 i\right )}}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{2}}\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.36, size = 55, normalized size = 0.87 \begin {gather*} \frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,4{}\mathrm {i}}{a^4\,d}+\frac {\mathrm {tan}\left (c+d\,x\right )}{a^4\,d}+\frac {4{}\mathrm {i}}{a^4\,d\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________